import 'dart:convert';
import 'package:flutter/material.dart';

List<PageLabelIcon> pageRouteFromJson(String str) =>
    List<PageLabelIcon>.from(json.decode(str).map((x) => PageLabelIcon.fromJson(x)));

String pageRouteToJson(List<PageLabelIcon> data) =>
    json.encode(List<dynamic>.from(data.map((x) => x.toJson())));

class PageLabelIcon {
  PageLabelIcon({
    this.route,
    this.label,
    this.icon,
  });

  String? route;
  String? label;
  IconData? icon;

  factory PageLabelIcon.fromJson(Map<String, dynamic> json) => PageLabelIcon(
        route: json["route"],
        label: json["label"],
        icon: json["icon"],
      );

  Map<String, dynamic> toJson() => {
        "route": route,
        "label": label,
        "icon": icon,
      };
}
